package library;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

public class ExPreferenceManager {
	//����α��ο� ���
	public final static String AUTO_LOGIN_OK = "true";
	
	/////////////////////////////////////////////////////
	
	public final static String TAG_ID = "0x111111";
	public final static String TAG_PW = "0x00003";
	public final static String TAG_AUTOLOGIN = "0x00002";
	public final static String TAG_NOTICE = "0x00001";
	public final static String TAG_GPS_AGREE = "0x00004";
	
	public final static String TAG_ONCARD_FIRST = "0x00005";
	public final static String TAG_ONTIME_FIRST = "0x00006";
	public final static String TAG_TIMETABLE_WRITE = "0x00007";
	
	
	
	private Editor editor;
	
	private SharedPreferences settings;
	private ExPreferenceManager Instance;
	
	
	public ExPreferenceManager(Context context){
		Instance = this;
		
		settings = context.getSharedPreferences("S", 1);
		editor = settings.edit();
		//���� �޴´�
	}
	
	public ExPreferenceManager getInstance(){
		return Instance;
	}
	
	public void putItem(String TAG, String value){
		editor.putString(TAG, value);
		editor.commit();
	}
	
	
	public String getItem(String TAG){
		return settings.getString(TAG, "");
	}
	
	public void putIntegerItem(String TAG, int value){
		editor.putInt(TAG, value);
		editor.commit();

	}
	
	public int getIntegerItem(String TAG){
		return settings.getInt(TAG, 0);
	}
	
			
}
